import apiUrl from '../base'
import axios from '@/libs/axios'

const earlyWarning = {
  getModule() {
    return axios.request({
      url: `${apiUrl.risk}v1/AlertMessageConfig/listModule`,
      method: 'get'
    })
  },
  getList(data) {
    return axios.request({
      url: `${apiUrl.risk}v1/AlertMessageConfig/listPoint?module=${data}`,
      data,
      method: 'get'
    })
  },
  edit(data) {
    return axios.request({
      url: `${apiUrl.risk}v1/AlertMessageConfig/edit`,
      data,
      method: 'post'
    })
  },
  //判断是否为调度岗
  getUser() {
    return axios.request({
      url: `${apiUrl.risk}v1/DispatchPost/checkDispatchPostForToken`,
      method: 'get'
    })
  }
}
export default earlyWarning
